<div class="title">Cập nhật người dùng</div>
<?php echo $this->Form->create('System', array('action' => 'editUser')); ?>
	<?php if (isset($errors) && !empty($errors)): ?>
	<div id="errors">
		<ul>
			<?php foreach ($errors as $rules):
				foreach ($rules as $key => $error):
				?>
				<li><?php echo $error;?></li>
			<?php endforeach; endforeach ?>
		</ul>
	</div>
	<?php endif ?>
	
	<p>
		<span class="title">Họ tên<span class="required">*</span></span>
		<span><?php echo $this->Form->input('User.ho_ten', array('div' => false, 'label' => false));?></span>
	</p>
	<p>
		<span class="title">Ngày sinh<span class="required">*</span></span>
		<span><input type="text" name="data[User][ngaysinh]" class="datetime" value="<?php echo $this->Time->format('d/m/Y', $this->request->data['User']['birth_day'])?>" id="ngaysinh" style="widtch:80px;"/>
		 </span>
	</p>
	<p>
		<span class="title">Phòng</span>
		<span><?php echo
			$this->Form->input('User.phong_id',array(
                                  'type' => 'select',
                                  'options' => $phongs,
                                  'selected' => $selectedPhong,
                                  'div' => false,
                                  'label' => false
                              ));
			?>
		</span>
	</p>
	<p>
		<span class="title">Email<span class="required">*</span></span>
		<span><?php echo $this->Form->input('User.email', array('div' => false, 'label' => false, 'disabled' => "true"));?></span>
	</p>
	<p>
		<span class="title">Tên truy cập<span class="required">*</span></span>
		<span><?php echo $this->Form->input('User.username', array('div' => false, 'label' => false, 'disabled' => "true"));?></span>
		<span><?php echo $this->Form->hidden('User.username');?></span>
	</p>
	<p>
		<span class="title">Mật khẩu<span class="required">*</span></span>
		<span><?php echo $this->Form->password('User.password', array('div' => false, 'label' => false));?></span>
	</p>
	<p>
		<span class="title">Nhắc lại mật khẩu<span class="required">*</span></span>
		<span><?php echo $this->Form->password('User.repassword', array('div' => false, 'label' => false));?></span>
	</p>
	
	<input type="submit" value="Cập nhật"/>
<?php echo $this->Form->end(); ?>
<script type="text/javascript">
	$(document).ready(function () {
		$("input.datetime").datepicker({dateFormat:"dd/mm/yy",changeYear: true });
	});
</script>